<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="br.com.portalweb.modelo.Veiculo"%>
<%@page import="java.util.List"%>
<%@page import="br.com.portalweb.dao.VeiculoDAO"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link  href="/portal/css/stylesheet.css" rel="stylesheet" type="text/css" >
        <title>....::::::: P O R T A L :::::::....</title>
    </head>
    <body>
        <%@include file="/jspf/header.jspf" %>
        <div id="conteudo">
            <h2 align="center">Confira nossas ofertas!</h2>
            <%
                        VeiculoDAO dao = new VeiculoDAO();
                        List<Veiculo> veiculos = dao.listar();
                        for (Veiculo veiculo : veiculos) {
            %>
            <div class="oferta">
                <h5><%= veiculo.getDescricao()%></h5>
                <p>Marca: <%= veiculo.getMarca()%></p>
                <p>Preço: <%= veiculo.getPreco()%></p>
                <p><a href= "<%= "/portal/proposta/novo.jsp?idLoja=" + veiculo.getLoja_id().toString() +
                        "&idVeiculo=" + veiculo.getId().toString() %>"> Enviar proposta...</a></p>

            </div>
            <%
            }
            %>
        </div>
        <%@include file="/jspf/footer.jspf" %>
    </body>
</html>
